// pages/DAS28assessmentSix/DAS28assessmentSix.js
var app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
  
  },
  // 跳转
  url: function (e) {
    wx.redirectTo({
      url: '../DAS28assessmentFive/DAS28assessmentFive'
    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
  
  },
  slider3change:function (e) {
    app.d.jiangchen = e.detail.value;
  },
  next:function () {
    var that = this;
    wx.request({
      url: app.d.ceshiUrl + '/Api/Evaluate/guan_send',
      method: "post",
      data: {
        uid: app.d.userId,
        ya_left_1: app.d.ya_left_1,
        ya_left_2: app.d.ya_left_2,
        ya_left_3: app.d.ya_left_3,
        ya_left_4: app.d.ya_left_4,
        ya_left_5: app.d.ya_left_5,
        ya_right_1: app.d.ya_right_1,
        ya_right_2: app.d.ya_right_2,
        ya_right_3: app.d.ya_right_3,
        ya_right_4: app.d.ya_right_4,
        ya_right_5: app.d.ya_right_5,
        zhong_left_1: app.d.zhong_left_1,
        zhong_left_2: app.d.zhong_left_2,
        zhong_left_3: app.d.zhong_left_3,
        zhong_left_4: app.d.zhong_left_4,
        zhong_left_5: app.d.zhong_left_5,
        zhong_right_1: app.d.zhong_right_1,
        zhong_right_2: app.d.zhong_sight_2,
        zhong_right_3: app.d.zhong_right_3,
        zhong_right_4: app.d.zhong_right_4,
        zhong_right_5: app.d.zhong_right_5,
        xue_ya: app.d.xue_ya,
        dan_bai: app.d.dan_bai,
        zhengti: app.d.zhengti,
        h1: app.d.h1,
        h2: app.d.h2,
        h3: app.d.h3,
        h4: app.d.h4,
        h5: app.d.h5,
        h6: app.d.h6,
        h7: app.d.h7,
        h8: app.d.h8,
        jiangchen: app.d.jiangchen,
      },
      header: {
        'Content-Type': 'application/x-www-form-urlencoded'
      },
      success: function (res) {
        if (res.data.status == 1) {
          var id = res.data.id;
          wx.redirectTo({
            url: '../DAS28Details/DAS28Details?id='+id
          })
        } else {
          wx.showToast({
            title: res.data.err,
          })
        }
      },
      fail: function (e) {
        wx.showToast({
          title: '网络异常！',
          duration: 30000
        });
      },
    })
    
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {
  
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
  
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {
  
  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {
  
  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {
  
  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {
  
  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {
  
  }
})